<template>
    <div>
        <p @click="emitFn">Son1</p>
    </div>
</template>

<script setup>
import eventBus from './eventBus'
import { ref, onMounted } from 'vue';
const boolean = ref(true);
const emitFn = () => {
    eventBus.emit('myevent', boolean)
}

// onMounted(() => {
//     eventBus.emit('myevent', boolean)
// })

</script>
<style scoped></style>